package io.renren.modules.sys.controller;

import io.renren.common.utils.HttpUtils;
import io.renren.common.utils.R;
import io.renren.modules.sys.service.SysConfigService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * 所有的大数据控制界面
 */

@RestController
@RequestMapping("sys/screenControl")
public class BigDataController {
@Autowired
private SysConfigService sysConfigService;

private static final  String PARAMKEY_CLOSE_API_CONFIG="API_URL_CLOSEALL";
    /**
     * 关闭所有屏幕
     */
    @RequestMapping("/closeAll")
    public R closeAll(){
        String  url=sysConfigService.getValue(PARAMKEY_CLOSE_API_CONFIG);
        HttpUtils.sendPostByMap(url,new HashMap<String,String>());
        return R.ok();
    }
}
